import request from '@/utils/request';

/** 查询收款卡列表 */
export const getPaymentCardListApi = (data: any) => {
  return request({
    url: '/system/receivePaymentCard/list',
    method: 'post',
    data: data
  });
};

/** 获取所有收款卡 */
export const getAllPaymentCardApi = () => {
  return request({
    url: '/system/receivePaymentCard/getAllCardList',
    method: 'get'
  });
};

/** 新增收款卡 */
export const addPaymentCardApi = (data: any) => {
  return request({
    url: '/system/receivePaymentCard',
    method: 'post',
    data: data
  });
};

/** 新增内部转账 */
export const addInnerTransferApi = (data: any) => {
  return request({
    url: '/system/internalTransfer',
    method: 'post',
    data: data
  });
};

/** 获取收款卡记录详情 */
export const getPaymentCardDetailApi = (id: number) => {
  return request({
    url: '/system/receivePaymentCard/getAccountDetail',
    method: 'get',
    params: { id }
  });
};

/** 新增财务收付款 */

export const addFinancePaymentApi = (data: any) => {
  return request({
    url: '/system/financePaymentCollection',
    method: 'post',
    data: data
  });
};

/** 删除收款卡 */
export const deletePaymentCardApi = (id: number) => {
  return request({
    url: `/system/receivePaymentCard/${id}`,
    method: 'delete',
  });
};

/** 根据公司id获取收款卡 */

export const getPaymentCardByCompanyIdApi = (id: number) => {
  return request({
    url: '/system/receivePaymentCard/getCardByCompanyId',
    method: 'get',
    params: { id }
  });
};